WebRTC

interface WebRTC

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Get an object on the metrics and call's quality See IStatistics

Link copied to clipboard
abstract val eglBaseContext: EglBase.Context

this method is used to get the Egl Context needed to render videos

Link copied to clipboard
abstract val localVideoTrack: VideoTrack?

Get the video track of your current sent video if available

Functions

Link copied to clipboard
abstract fun activateSimulcast(activate: Boolean)

Activate simulcast. Simulcast will send 3 video streams (LOW, MEDIUM and HIGH) when you add video in a conference call. Depending on your bandwidth and CPU, only LOW and MEDIUM can be sent and even only LOW.

Link copied to clipboard
abstract fun addVideo(call: WebRTCCall?, front: Boolean): Boolean

this method is used to add video when the call is only in audio mode

Link copied to clipboard
abstract fun dropVideo(call: WebRTCCall?): Boolean

this method is used to drop video when the call is in video mode

Link copied to clipboard
abstract fun getActiveSpeakerVideoTrack(): VideoTrack?

Get the video track of the active speaker if available. You must subscribe to it first through Bubbles module.

Link copied to clipboard
abstract fun getCallByContact(contact: IRainbowContact?): WebRTCCall?

this method is used to get the current call matching the given contact

Link copied to clipboard
abstract fun getCallByRoomId(roomId: String?): WebRTCCall?

this method is used to get the current call matching the given roomId

Link copied to clipboard
abstract fun getCallBySid(sid: String?): WebRTCCall?

this method is used to get the current call matching the given sid

Link copied to clipboard
abstract fun getCalls(): List<WebRTCCall>

this method is used to get the current calls

Link copied to clipboard
abstract fun getDistantVideoTracks(type: PeerSession.PeerSessionType): List<VideoTrack>

get distant video tracks by peer session type

abstract fun getDistantVideoTracks(call: WebRTCCall): List<VideoTrack>

get distant video tracks by WebRTCCall

abstract fun getDistantVideoTracks(publisherId: String?): List<VideoTrack>

get distant video tracks by publisher id

abstract fun getDistantVideoTracks(type: PeerSession.PeerSessionType, publisherId: String?): List<VideoTrack>

get distant video tracks by peer session type and publisher id

Link copied to clipboard
abstract fun getPickableCall(): CallExtension?

Let you know if there is an ongoing call on another device from the user that can be picked up on this one.

Link copied to clipboard
abstract fun hangupCall(call: WebRTCCall?)

This method is used to hangup a call when a call is established

Link copied to clipboard
abstract fun hold(call: WebRTCCall?)

Hold a P2P call

Link copied to clipboard
abstract fun holdVideo(call: WebRTCCall?, publisherId: String?, sharing: Boolean)

Hold the subscribed video from the given participant id in order to reduce data consumption (can be useful when a video is not displayed any more). This is far more efficient than just using unsubscribeToVideo/subscribeToVideo.

Link copied to clipboard
abstract fun isMuted(): Boolean

is muted?

Link copied to clipboard
abstract fun isSendingMedia(): Boolean

Let you know if audio/video is currently sent

Link copied to clipboard
abstract fun isServerPlayingRingBackTone(): Boolean

Let you know if the server is playing ring back tone for outgoing PBX calls. Only for Cloud PBX.

Link copied to clipboard
abstract fun makeCall(contact: IRainbowContact, video: Boolean, front: Boolean, subject: String?)

Make a call using web rtc stack.

Link copied to clipboard
abstract fun makeConferenceCall(roomId: String, webinar: Boolean, jingleJid: String)

Let you establish a call within a conference that has previously been joined through the Bubbles module. The Bubbles join request will give the roomId and jingleJid that are needed here.

Link copied to clipboard
abstract fun mute(mute: Boolean, distant: Boolean)

this method is used to mute me or a distant contact

Link copied to clipboard
abstract fun muteOnlyDistant(mute: Boolean)

this method is used to mute a distant contact

Link copied to clipboard
abstract fun pickupCall(callExtension: CallExtension)

Pickup a P2P call from another device

Link copied to clipboard
abstract fun registerTelephonyListener(listener: ITelephonyListener)

this method is used to register to web rtc events

Link copied to clipboard
abstract fun registerTelephonyMgrListener(listener: TelephonyMgr.ITelephonyMgrListener)

this method is used to register to telephony events

Link copied to clipboard
abstract fun rejectCall(call: WebRTCCall?)

This method is used when user does not answer of an incoming call

Link copied to clipboard
abstract fun retrieveVideo(call: WebRTCCall?, publisherId: String?, sharing: Boolean)

Retrieve the subscribed video from the given participant id in order to get back stream (can be useful when a video is displayed again). This is far more efficient than just using unsubscribeToVideo/subscribeToVideo.

Link copied to clipboard
abstract fun switchCamera(call: WebRTCCall?)

this method is used to switch camera

Link copied to clipboard
abstract fun takeCall(call: WebRTCCall?, withVideo: Boolean, front: Boolean)

This method is used when incoming call event is detected

Link copied to clipboard
abstract fun transferCall(call: WebRTCCall?, contact: IRainbowContact?, listener: RainbowListener<Unit, TransferRoutingError?>?)

Transfer the current P2P call to the given contact. Only for Could PBX.

Link copied to clipboard
abstract fun transferCalls(activeCall: WebRTCCall?, heldCall: WebRTCCall?)

Transfer the current P2P calls. Only for Could PBX.

Link copied to clipboard
abstract fun unhold(call: WebRTCCall?)

Retrieve a P2P call

Link copied to clipboard
abstract fun unregisterTelephonyListener(listener: ITelephonyListener)

this method is used to unregister to web rtc events

Link copied to clipboard
abstract fun unregisterTelephonyMgrListener(listener: TelephonyMgr.ITelephonyMgrListener)

this method is used to unregister to telephony events